﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Editor
{
    static class Program
    {
        static Editor ed;
        /// <summary>
        /// Главная точка входа для приложения.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Form1 f=new Form1();
            f.Disposed += new EventHandler(form_Disposed);
            using (ed = new Editor(f.Handle, f.ViewEditor.Handle))
            {
                f.Show();
                //f.TopMost = true;
                ed.Run();
            }
          //  Application.Run(new Form1());
        }

       
        static void form_Disposed(object sender, EventArgs e)
        {
            
            ed.Exit();
        }
    }
}
